package tetris.data;

public class Pieces
{
    public static Piece getPiece(char piece)
    {
        if (piece == 'I')
        {
            return new IPiece();
        }
        else if (piece == 'J')
        {
            return new JPiece();
        }
        else if (piece == 'L')
        {
            return new LPiece();
        }
        else if (piece == 'O')
        {
            return new OPiece();
        }
        else if (piece == 'S')
        {
            return new SPiece();
        }
        else if (piece == 'T')
        {
            return new TPiece();
        }
        else if (piece == 'Z')
        {
            return new ZPiece();
        }
        else
        {
            return new Piece();
        }
    }
}
